import { ObjectDto } from "../../../services/sqliteDB/object.dto";
import { TableColumnType } from "../../../services/sqliteDB/object.dto";
import {SyncStatus} from "../../sync-status";

export class InspectionOperationsTicketsDto extends ObjectDto {

    public id: string = null;                       // 操作票Id， 编号， 索引列
    public taskId: string = null;                   // 检修任务的Id
    public type: string = null;                     // 类型
    public fromCompany: string = null;              //  发令单位
    public fromName: string  = null;                //  发令人
    public fromId: string  = null;                  //  发令人Id
    public toName: string = null;                   //  受令人
    public toId: string  = null;                    //  受令人Id
    public orderTakenTime: number = null;           //  受令时间
    public operationBeginTime: number = null;       //  操作开始时间
    public operationEndTime: number = null;         //  操作结束时间
    public operatorName: string = null;             //  操作人
    public operatorId: string = null;               //  操作人Id
    public guarder: string = null;                  //  监护人
    public guarderId: string = null;                // 监护人Id
    public dutyStackholder: string = null;          //  值班负责人
    public dutyStackholderId: string = null;        //  值班负责人id
    public remark: string = null;                   // 备注
    public attachmentIds: string = null;            //  拍照附件的的Id列表，逗号分隔
    public syncStatus: SyncStatus = SyncStatus.None;              // 同步状态：   （0: 从来没上传, 1: 上传成功, 2: 正在上传, 3: 上传失败)


    constructor() {
        super();
    }

    table() {
        return {
            tableName: "InspectionOperationsTickets",
            tableConstructor: {
                id: `${TableColumnType.text}`,
                taskId: TableColumnType.text,
                type: TableColumnType.text,
                fromCompany: TableColumnType.text,
                fromName: TableColumnType.text,
                fromId: TableColumnType.text,
                toName: TableColumnType.text,
                toId: TableColumnType.text,
                orderTakenTime: TableColumnType.int,
                operationBeginTime: TableColumnType.int,
                operationEndTime: TableColumnType.int,
                operatorName: TableColumnType.text,
                operatorId: TableColumnType.text,
                guarder: TableColumnType.text,
                guarderId: TableColumnType.text,
                dutyStackholder: TableColumnType.text,
                dutyStackholderId: TableColumnType.text,
                remark: TableColumnType.text,
                attachmentIds: TableColumnType.text,
                syncStatus: TableColumnType.int,
            }
        };
    }

}
